input elements python matrix